from django.contrib import admin
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from rest_framework_simplejwt.views import TokenObtainPairView

from users.views import ImageVerifyView, UserViewSet, MyTokenObtainPairView, AreaViewSet, AddressViewSet

urlpatterns = [
    path('verification/<str:func>/<uuid:uuid>/', ImageVerifyView.as_view()),
    path('login/',MyTokenObtainPairView.as_view() ),
]
route = DefaultRouter()  # 实例化路由器，创建路由器对象
route.register('users', UserViewSet)  # 注册路由器，针对UserViewSet视图类
route.register("area",AreaViewSet)
route.register("address",AddressViewSet)
urlpatterns+=route.urls